package com.htj.powerbank.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.htj.powerbank.entity.Shop;
import com.htj.powerbank.mapper.ShopMapper;
import com.htj.powerbank.service.ShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ShopServiceImpl implements ShopService {

    @Autowired
    ShopMapper shopMapper;

    @Override
    public List<Shop> getShopListAll() {
        return shopMapper.getShopInfolistall();
    }

    @Override
    public List<Shop> getShopListbyid(int id) {
        return shopMapper.getShopInfolistbyid(id);
    }

    @Override
    public IPage<Shop> getShopList(Page<Shop> page, Shop shop , Boolean isDesc) {
        return (IPage<Shop>) shopMapper.getShopInfolist(page, shop , isDesc);
    }
}
